﻿using DbF;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DbEntity
{
   public class BaseService
    {
        public static IDbHelper Db
        {
            get
            {
                try
                {
                    string Db = @"Data Source= |DataDirectory|\AyaWoDB.db; Pooling=true;";
                    
                    //   return new DbHelper(@"server=122.112.229.171;user id=root ;password=lxq!1066;database=ayawoWeb;charset=utf8", SqlSourceType.MySql);
                    return new DbHelper(Db, SqlSourceType.SqLite);
                }
                catch (Exception ex)
                {
                    Log.Error(ex.Message);
                    return null;
                }
            }
            private set
            {
            }
        }
    }
}
